# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-distorm
_pkgname=distorm3
pkgver=3.5.2
pkgrel=1
pkgdesc='The goal of diStorm3 is to decode x86/AMD64 binary streams and return a structure that describes each instruction.'
url='https://pypi.org/project/distorm3/#files'
arch=('x86_64' 'aarch64')
license=('BSD')
depends=('python2' 'glibc')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('bc08a12f87e6bf22ff9bbba8a34b88b0988b80ddec405c669ba5cd863545128f8b3df4b122a69f4849af3d08818c836b368332e6546871bdfee99e611b3f8d19')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

